

using Backoffice.Application.DTOs;
using FluentValidation;

public class UserInfoDtoValidator : AbstractValidator<UserDto>
{
    public UserInfoDtoValidator()
    {
        RuleFor(x => x.Email).NotEmpty().EmailAddress();
        RuleFor(x => x.Phone).NotEmpty().Matches(@"^\+?[1-9]\d{1,14}$"); // 简单的电话号码格式验证
    }
}